package com.henau.lx.service.impl;

import com.henau.lx.dao.UserDao;
import com.henau.lx.dao.impl.UserDaoImpl;
import com.henau.lx.pojo.User;
import com.henau.lx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userServiceImpl")
public class UserServiceImpl implements UserService {
//    @Value("王华")
//    private String name;
//    @Autowired
//    UserDao userDao;
//    @Override
//    public void save() {
//        System.out.println("CustomerService保存了");
//        //调用dao层
//        userDao.save();
//        System.out.println(name);
//    }
    @Resource(name="userDaoImpl")
    UserDao userDao;

    @Override
    public List<User> findUserByName() {
        return userDao.findUserByName();
    }
}
